//
//  TSHandleAlertView.h
//  OCBase
//
//  Created by Duncan on 2021/1/12.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface TSHandleAlertView : NSObject

typedef void(^AlertViewBlock)(NSInteger buttonTag);

#pragma mark ------- UIAlertControllerStyleAlert -------

/**
 *  系统提示框 - 提示一些错误信息，如：输入手机号、密码格式不正确，或者输入为空等
 */
+ (void)showSystemAlertViewMessage:(NSString * _Nullable)message title:(NSString * _Nullable)title;

/// 确定回调
+ (void)showSystemAlertViewMessage:(NSString *)message OKHandler:(void (^ __nullable)(UIAlertAction *action))okHandler;

/// 取消回调
+ (void)showSystemAlertViewMessage:(NSString * _Nullable)message title:(NSString * _Nullable)title cancelTitle:(NSString * _Nullable)cancelTitle;

/// 确定回调
+ (void)showSystemAlertViewMessage:(NSString * _Nullable)message title:(NSString * _Nullable)title cancelTitle:(NSString * _Nullable)cancelTitle OKHandler:(void (^ __nullable)(UIAlertAction *_Nullable action))handler;

/// 设置确定文字，确定回调
+ (void)showSystemAlertViewMessage:(NSString * _Nullable)message title:(NSString * _Nullable)title okTitle:(NSString * _Nullable)okTitle cancelTitle:(NSString * _Nullable)cancelTitle OKHandler:(void (^ __nullable)(UIAlertAction *_Nullable action))handler;

/// 取消，确定文字-回调
+ (void)showSystemAlertViewMessage:(NSString * _Nullable)message title:(NSString * _Nullable)title okTitle:(NSString * _Nullable)okTitle cancelTitle:(NSString * _Nullable)cancelTitle OKHandler:(void (^ __nullable)(UIAlertAction * _Nullable action))okHandler cancelHandler:(void (^ __nullable)(UIAlertAction *_Nullable action))cancelHandler;

/// TextField
+ (void)showSystemAlertViewMessage:(NSString * _Nullable)message title:(NSString * _Nullable)title okTitle:(NSString * _Nullable)okTitle cancelTitle:(NSString * _Nullable)cancelTitle OKHandler:(void (^ __nullable)(UIAlertAction * _Nullable action))okHandler cancelHandler:(void (^ __nullable)(UIAlertAction * _Nullable action))cancelHandler addTextFieldWithConfigurationHandler:(void (^ __nullable)(UITextField * _Nullable textField))configurationHandler;

#pragma mark ------- UIAlertControllerStyleActionSheet -------
+ (void)showSystemSheetViewWithTitleArray:(NSArray * _Nullable)titleArray confirm:(AlertViewBlock _Nullable)confirm;
+ (void)pad_showSystemSheetViewWithTitleArray:(NSArray * _Nullable)titleArray confirm:(AlertViewBlock _Nullable)confirm view:(UIView *)view frame:(CGRect)frame;

@end

NS_ASSUME_NONNULL_END
